import {request} from '@/utils/request'

const apiUrl = '/api/v1/config/'
const apiUrl2 = '/api/v1/dev/'

// 读取配置
export function loadLedFile(id) {
    return request({
        url: `${apiUrl}loadLedFile/${id}`,
        method: 'get'
    })
}

// 保存配置
export function saveLedFile(data) {
    return request({
        url: apiUrl + 'saveLedFile',
        method: 'post',
        data
    })
}

// 发送基础配置
export function sendLedConfig(id) {
    return request({
        url: `${apiUrl}sendLedConfig/${id}/base`,
        method: 'post',
        data:{},
        headers: {
            'Content-Type': "application/json",
        },
    })
}

export function getMessageStatus(id) {
    return request({
        url: `${apiUrl2}getMessageStatus/${id}`,
        method: 'get'
    })
}

// 发送节目配置
export function sendLedConfigdisplay(id) {
    return request({
        url: `${apiUrl}sendLedConfig/${id}/display`,
        method: 'post',
        data:{},
        headers: {
            'Content-Type': "application/json",
        },
    })
}
